//
//  LLNotifyModel.h
//  SDWebExercise
//
//  Created by admin on 2019/11/21.
//  Copyright © 2019 admin. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void(^NotifyBlock)(NSNotification * _Nullable notify);

NS_ASSUME_NONNULL_BEGIN

@interface LLNotifyCenter : NSObject

+ (instancetype)shareCenter;

///添加通知
- (void)addObserver:(nonnull id)observer name:(NSString *)name object:(nullable id)object usingBlock:(NotifyBlock)block;

///发出通知
- (void)postNotificationName:(NSString *)name object:(nullable id)object;

///移除观察者，这个要在dealloc里面移除
- (void)removeObserver:(nonnull id)observer name:(NSString *)name object:(nullable id)object;

///移除这个对象的所有通知
- (void)removeObserver:(id)observer;

@end

NS_ASSUME_NONNULL_END
